//
//  ClubModel.m
//  Shengzhuli
//
//  Created by FXGuo on 2017/7/19.
//  Copyright © 2017年 kamangkeji. All rights reserved.
//

#import "ClubModel.h"
#import "ImageTitleModel.h"

@implementation ClubModel

- (instancetype)initWithDict:(NSDictionary *)dict
{
    if (self = [super init]) {
        self.backgroundImg = dict[@"backgroundImg"];
        self.clubLogo = dict[@"clubLogo"];
        self.clubName = dict[@"clubName"];
        self.content = dict[@"content"];
        self.ID = [dict[@"id"] integerValue];
        self.userId = [dict[@"userId"] integerValue];
        self.keepStatus = [dict[@"keepStatus"] integerValue];
        for (NSDictionary *modelDict in dict[@"clubDetailList"]) {
            ImageTitleModel *model = [ImageTitleModel objectWithDict:modelDict];
            [self.clubDetailList addObject:model];
        }
        self.keepCount = [dict[@"keepCount"] integerValue];
        self.fans = [dict[@"fans"] integerValue];
        self.activityCount = dict[@"activityCount"];
        self.activityPersonCount = dict[@"activityPersonCount"];
        self.clubUrl = dict[@"clubUrl"];
        self.videoUrl = dict[@"videoUrl"];
    }
    return self;
}

+ (instancetype)objectWithDict:(NSDictionary *)dict
{
    return [[ClubModel alloc]initWithDict:dict];
}



- (NSMutableArray *)clubDetailList
{
    if (!_clubDetailList) {
        _clubDetailList = [NSMutableArray array];
    }
    return _clubDetailList;
}

- (NSMutableArray *)details
{
    if (!_details) {
        _details = [NSMutableArray array];
    }
    return _details;
}
- (NSMutableArray *)nearActivities
{
    if (!_nearActivities) {
        _nearActivities = [NSMutableArray array];
    }
    return _nearActivities;
}
- (NSMutableArray *)oldActivities
{
    if (!_oldActivities) {
        _oldActivities = [NSMutableArray array];
    }
    return _oldActivities;
}


@end
